package pathFinding;

public class Trajet
{
	/**
	 * 
	 */
	private int idS1;
	private int idS2;
	private double distance;
	
	public static final int INFINI = 999999999;
	
	public Trajet(int s1, int s2, double distance2) {
		idS1 = s1;
		idS2 = s2;
		
		this.distance = distance2;
	}

	public int getIdS1() {
		return idS1;
	}
	
	public int getIdS2() {
		return idS2;
	}

	public double getDistance() {
		return distance;
	}

	@Override
	public String toString() {
		return idS1 + ";" + idS2;
	}
	@Override
	public boolean equals(Object obj) {
		boolean aReturn = false;
		Trajet aComparer = (Trajet) obj;
		try{
			if ((aComparer.getIdS1() == this.idS1 && aComparer.getIdS2() == this.idS2) || (aComparer.getIdS1() == this.idS2 && aComparer.getIdS2() == this.idS1))
			{
				aComparer.getIdS1();
				aReturn =  true;
			}
			else
			{
				aReturn =  false;
			}
		}
		catch(Exception e)
		{
			aReturn =  false;
		}
		
		
		return aReturn;
	}

	
	
}